import { Component, ViewChild } from '@angular/core';
import { NavController, NavParams, Slides } from 'ionic-angular';

@Component({
  selector: 'page-home',
  templateUrl: 'home.html'
})
export class HomePage {
	@ViewChild('slider') slider: Slides;

  slides = [
    {
      title: '你想学好英语吗?',
      imageUrl: 'assets/img/4.jpeg'
    },
    {
      title: '最远的地方',
      imageUrl: 'assets/img/1.jpeg'
    },
    {
      title: '品茶大师',
      imageUrl: 'assets/img/2.jpeg'
    },
    {
      title: '设计面面观',
      imageUrl: 'assets/img/3.jpeg'
    }
  ];
  items = [
    {
      title: '别压抑,你需要释放',
      imageUrl: 'assets/img/slide1.jpeg',
      num: 53463
    },
    {
      title: '[经典名著选读]：俳句的颠覆',
      imageUrl: 'assets/img/slide2.jpeg',
      num: 42316
    },
    {
      title: '时间再少,也要挤出来读书',
      imageUrl: 'assets/img/slide3.jpg',
      num: 545678 
    },
    {
      title: '我这么努力,就是为了不辜负自己',
      imageUrl: 'assets/img/slide4.jpg',
      num: 12234
    },
    {
      title: '爱情应有的样子',
      imageUrl: 'assets/img/slide5.jpg',
      num: 53463
    },
    {
      title: '时间再少,也要挤出来读书',
      imageUrl: 'assets/img/slide3.jpg',
      num: 42344
    },
    {
      title: '别压抑,你需要释放',
      imageUrl: 'assets/img/slide1.jpeg',
      num: 5342 
    },
    {
      title: '[经典名著选读]：俳句的颠覆',
      imageUrl: 'assets/img/slide2.jpeg',
      num: 1234
    }
  ];
  
  constructor(public navCtrl: NavController,  public navParams: NavParams) {

  }
  onSlideChanged() {
    const currentIndex = this.slider.getActiveIndex();
    // console.log(currentIndex);
  }

}
